package mylab.starters.mybatis.interceptor.impl;

import com.baomidou.mybatisplus.extension.plugins.inner.DynamicTableNameInnerInterceptor;
import mylab.starters.mybatis.interceptor.OrderlyInterceptor;
import mylab.starters.mybatis.config.dynamicTable.DynamicTableProperties;
import mylab.starters.mybatis.interceptor.impl.dynamicTable.DefaultTableNameHandler;

public class MyDynamicTableNameInnerInterceptor extends DynamicTableNameInnerInterceptor implements OrderlyInterceptor {

    public MyDynamicTableNameInnerInterceptor(DynamicTableProperties properties) {
        DefaultTableNameHandler tableNameHandler = new DefaultTableNameHandler(properties);
        setTableNameHandler(tableNameHandler);
    }

    @Override
    public int getOrder() {
        return OrderlyInterceptor.DynamicTableName;
    }

    @Override
    public String getDescription() {
        return "动态表名插件";
    }

}
